﻿<UserControl
    x:Class="Codeplex.InertialScroll.MainPage"
    xmlns:local="clr-namespace:Codeplex.InertialScroll"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:interactivity="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
    TextOptions.TextHintingMode="Animated"
    mc:Ignorable="d"
    d:DesignHeight="300"
    d:DesignWidth="400">

    <Grid
        x:Name="LayoutRoot"
        Background="SaddleBrown">

        <Grid.RowDefinitions>
            <RowDefinition
                Height="Auto"></RowDefinition>
            <RowDefinition
                Height=".5*"></RowDefinition>
            <RowDefinition
                Height=".5*"></RowDefinition>
        </Grid.RowDefinitions>

        <StackPanel
            Grid.Row="0"
            Orientation="Horizontal">

            <TextBlock
                Foreground="White"
                FontSize="18"
                Margin="10"
                FontWeight="Bold">Inertial chessboard</TextBlock>

            <Button
                Margin="2"
                Height="24"
                x:Name="travelBottom"
                Click="travelBottom_Click"
                FontWeight="Bold">Travel Bottom</Button>

            <Button
                Margin="2"
                Height="24"
                x:Name="travelCenter"
                Click="travelCenter_Click"
                FontWeight="Bold">Travel Center</Button>

            <Button
                Margin="2"
                Height="24"
                x:Name="travelTop"
                Click="travelTop_Click"
                FontWeight="Bold">Travel Top</Button>
            
        </StackPanel>

        <Canvas
            x:Name="canvas"
            Margin="50"
            Grid.Row="1"
            Background="White"
            Width="700"
            Height="600">

            <Canvas.Clip>
                <RectangleGeometry
                    Rect="-0 -0 700 600" />
            </Canvas.Clip>

            <Grid
                x:Name="grid1">

                <interactivity:Interaction.Behaviors>
                    <local:InertialScrollBehavior />
                </interactivity:Interaction.Behaviors>

                <Grid.Effect>
                    <DropShadowEffect
                        ShadowDepth="0"
                        BlurRadius="16"
                        Color="Black"
                        Direction="0" />
                </Grid.Effect>
            </Grid>
        </Canvas>
    </Grid>
</UserControl>
